/**
 * 
 * @author Eliran
 * @param name represents tool's name
 * @param quantity represents the amount of tools in the kitchen
 *
 * KitchenTool class represents all tools in the kitchen and theirs amount
 */
import java.util.concurrent.*;

public class KitchenTool {
	private String name;
//	private int quantity;
	private Semaphore sem;
	
	
	public KitchenTool(String n, int q){
		name = n;
	//	quantity = q;
		sem = new Semaphore(q, true);
	}
	
	/**
	 * 
	 * @return tool's name
	 */
	public String getName() {
		return name;
	}
	
	public void acquire() {
		sem.acquire();
	}
	
	public void release() {
		sem.release();
	}
	
}
